PySwarm Rules
There are currently eight rules available to apply in creating BOID behavior. This page provides a high-level summary of these rules and links to further details about when to consider using the rules and how to set them. This list will be expanded in later releases of PySwarm. Refer to the following Wiki page for information about future enhancements to PySwarm - here. Cohesion When COHESION is activated, BOIDs will attempt to group together by moving towards the group’s center of mass (the average of all BOIDs’ positions). To read details about this rule, and about examples where this rule might apply, click here. Separation When SEPARATION is activated, BOIDs will attempt to keep some predefined safe distance between themselves and all other BOIDs. You can think of this like BOIDs attempting to keep some personal space. This works to counteract too much COHESION. To read details about this rule, and about examples where this rule might apply, click here. Alignment When ALIGNMENT is activated, BOIDs will attempt to match their velocity (speed and heading) with the others in the group. To read details about this rule, and about examples where this rule might apply, click here. Containment When CONTAINMENT is activated, BOIDs will attempt to stay inside (safe) or outside (restricted) specified regions of space. When BOIDs venture outside safe regions or inside restricted regions, they will naturally try to alter their course to go back inside the closest safe region. To read details about this rule, and about examples where this rule might apply, click here. If you are using this to keep BOIDs within walls, set the limits slightly inside the walls. Attraction When ALIGNMENT is activated, BOIDs will attempt to move towards a specified object in the Carrara scene. Like “moths to a flame,” use an attractor to draw BOIDs towards a specific location in your scene. Also, when attractor objects move around in the scene, the BOIDs will attempt to follow. So you can use an attractor to draw BOIDs along a specified path or route. To read details about this rule, and about examples where this rule might apply, click here. Note: PySwarm uses the object’s HotPoint as the focus of the attraction. Landing When LANDING is activated, BOIDs will land on the ground if they fly to (strike) it. When BOIDs land, they will remain there for some random period of time, as determined by the rule's parameters. To read details about this rule, and about examples where this rule might apply, click here. Remember to set your containment area so BOIDs will fly to the ground. Note: With this version of PySwarm, you should only use “Linear” tweeners when this rule is active. Speed Limit When SPEED LIMIT is activated, BOIDs cannot go less than or exceed a specified speed range. To read details about this rule, and about examples where this rule might apply, click here. Max Turn When MAX TURN is activated, BOIDs are limited in the turning angle that they can make. For example, planes and cars cannot turn completely around instantaneously. To read details about this rule, and about examples where this rule might apply, click here.